import { DrawerForm } from '@ant-design/pro-form';
import { ActionType } from '@ant-design/pro-table';
import { Button } from 'antd';
import React, { useRef } from 'react';
import { useAccess } from 'umi';
import AssignAddCombineNode from './AssignAddCombineNode';
import TreeCombine from './TreeCombine';

interface AssignCombineProps {
  onRefurbish: () => void;
}

const AssignCombine: React.FC<AssignCombineProps> = ({ onRefurbish }) => {
  const access = useAccess();
  const actionRef = useRef<ActionType>();

  return (
    <DrawerForm
      key="assign_address_drawer_form"
      title="关联组织单位"
      drawerProps={{
        destroyOnClose: true,
        extra: [<AssignAddCombineNode onRefurbish={function (): void {}} />],
      }}
      trigger={<Button type="primary">关联组织单位</Button>}
      onOpenChange={(visible) => {
        if (visible) {
        }
      }}
      submitter={false}
    >

      
      <TreeCombine onSelect={function (info: any): void {}} onRefurbish={function (): void {}} />
    </DrawerForm>
  );
};

export default AssignCombine;
